of

open fun of(width: Int, height: Int): Rect

Returns the Rect instance for the given width and height values.

Throws

when width or height is negative


open fun of(x: Int, y: Int, width: Int, height: Int): Rect

Returns the Rect instance for the given x, y, width, and height values.

Throws

when width or height is negative


open fun of(size: Size): Rect

Returns the Rect instance for the empty origin and the given size value.


open fun of(origin: Point, size: Size): Rect

Returns the Rect instance for the given origin and size values.